package cn.distant.tank;

import java.util.ArrayList;
import java.util.List;

/**
 * @author distantstar
 * @date 2021
 * @description cn.distant.tank
 * @version 1.0
 * @since JDK1.8
 */
public class Main {
    public static void main(String[] args) throws InterruptedException {
        // 新建窗口
        TankFrame tankFrame = new TankFrame();

        List<Tank> tanks = new ArrayList<>();
        int count = Integer.parseInt((String)PropertiesMgr.getKey("initalTankCount"));
        for (int i = 0; i < count; i++) {
            Tank tk = new Tank(100 + i * 60, 500, Dir.RIGHT, tankFrame, Group.BAD);
            tk.setMain(false);
            tanks.add(tk);
        }
        tankFrame.tanks = tanks;

        // 重新刷新
        while (true) {
            Thread.sleep(50);
            tankFrame.repaint();
        }
    }
}
